import $http from './network'

export function getSellerData() {
    return new Promise((resolve, reject) => {
        resolve($http.get('/seller'))
        reject(new Error('获取seller数据失败！'))
    })
}

export function getTrendData() {
    return new Promise((resolve, reject) => {
        resolve($http.get('/trend'))
        reject(new Error('获取trend数据失败！'))
    })
}

export function getChinaData() {
    return new Promise((resolve, reject) => {
        resolve($http.get('/china'))
        reject(new Error('获取china数据失败！'))
    } )
}

export function getMapData() {
    return new Promise((resolve, reject) => {
        resolve($http.get('/map'))
        reject(new Error('获取map数据失败！'))

    })
}

export function getClickData(path) {
    return new Promise((resolve, reject) => {
        resolve($http.get(path))
        reject(new Error('获取path数据失败！'))

    })
}

export function getRankData() {
    return new Promise((resolve, reject) => {
        resolve($http.get('/rank'))
        reject(new Error('获取rank数据失败！'))
    })
}

export function getHotData() {
    return new Promise((resolve, reject) => {
        resolve($http.get('/hotproduct'))
        reject(new Error('获取hotproduct数据失败！'))
    } )
}

export function getStockData() {
    return new Promise((resolve, reject) => {
        resolve($http.get('/stock'))
        reject(new Error('获取stockk数据失败！'))
    } )
}




